package com.itheima.idea;

public class DmeoArray1 {
    public static void main(String[] args) {
        //int类型的数组定义方法:数据类型[] 数组变量 = new 数据类型[数组长度]
        int[] arr = new int[3];
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println("=================");
        //对数组进行赋值
        arr[0] = 1;
        arr[1] = 2;
        arr[2] = 3;
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println("-----------------");
        int[] arr1 = new int[2];
        arr1[0] = 11;
        arr1[1] = 22;
        int[] arr2 = arr1;
        arr2[0] = 10;
        arr2[1] = 11;
        System.out.println(arr1[0]);
        System.out.println(arr1[1]);
        System.out.println(arr2[0]);
        System.out.println(arr2[1]);
    }



}
